package com.guoamo.mapdemo;

public class Computer implements Comparable<Computer> {


    private String brand;
    private Integer price;

    public Integer getPrice() {
        return price;
    }

    public String getBrand() {
        return brand;

    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }


    @Override
    public String toString() {
        return "Computer{" +
                "brand='" + brand + '\'' +
                ", price=" + price +
                '}';
    }


    public Computer(String brand, Integer price) {
        this.brand = brand;
        this.price = price;
    }

    public Computer() {
    }

    @Override
    public int compareTo(Computer o) {
        return this.price.compareTo(o.getPrice())   ;
    }
}
